1. Field of the Invention
The present invention relates to a device for extracting coding parameters contained in a flow of video data coded according to an MPEG1 or MPEG2 standard.
2. Discussion of the Related Art
The moving pictures expert group (MPEG) standards define conditions for coding and decoding animated images in the form of a digital video data flow and a digital audio data flow. These standards define the coding conditions of the animated images, whether they are associated with a sound signal or not, for their storage and/or their transmission, for example by radio means, as well as the decoding conditions of these images for their reconstitution on a screen. The digitized images are coded in order to decrease the amount of information which represents them. This coding generally uses compression and motion estimate techniques. The MPEG standards are, for example, used for storing image sequences on laser-read disks (compact disks), be they interactive or not, or on recording tapes. They are also used for image transmission, for example, on telephone lines or by radio means.
The coding and decoding conditions, defined by the MPEG standards, are available by standardization agencies, and only the criteria necessary to understand the invention will be indicated.
The decoding of information coded according to one of the MPEG standards uses a separation, by nature, of the information contained in the data flow. The data flow is organized in audio and video system packets. The data flow is demultiplexed to restore, in particular, a video data flow which is stored in an area of a RAM as the video packets appear in the data flow. The video decoding of the data flow is performed, from this video data flow, by a video decoder which is configured, by a microprocessor, according to the coding parameters contained in data series headers of the video data flow.
The present invention more specifically applies to extracting the coding parameters contained in data series headers of a video data flow, for example, extracted from a RAM for decoding.
FIG. 1 shows an example of a video data flow (video bitstream data) coded according to the MPEG1 standard.
A video data flow 1 is, according to the MPEG1 standard, divided in sequences 2 of groups 3 of images 4, each image 4 being divided into sub-images 5.
Each sequence 2 begins with a sequence header SEQ_H 6 preceded by a sequence starting code (sequence header code) SEQ_SC 7. Sequence header 6 contains parameters which are common to all the images of the sequence and which enable to reconfigure the video decoder for each sequence. These are, for example, the pixel outlook, the rate of the data flow, quantization tables, the image size, etc.
Sequence 2 is divided into groups of images 3, header 6 being followed by an image group starting code (group header code) GOP_SC 8. Although only one group 3 has been shown in FIG. 1, several image groups 3, and thus several codes 8, can be present within a same sequence 2. As for the beginning of a sequence 2, each code 8 is followed by a group header GOP_H 9 containing parameters relative to image group 3 and common to all the images in the group.
Group 3 is divided into images 4, the group header 9 being followed by an image starting code (picture header code) PIC_SC 10. Although only one image 4 has been shown in FIG. 1, several images 4, and thus several codes 10, can be present within a same group 3. As for groups 3, each code 10 is followed by an image header PIC_H 11 containing all the information relative to image 4 and common to all the sub-images of the image. Image header 11 notably contains the image type.
An image 4 contains at least one sub-image 5. Image header 11 is followed by a starting code of a first sub-image SCE_SC 12. Each code 12 is followed by the proper video data 13, compressed according to the MPEG1 standard.
In certain cases, more information (not shown) can be contained in video data flow 1. This information is itself preceded by starting codes (not shown). It is, for example, user-directed information, information about possible transmission errors or for the restoring of video data flow 1. It can also be quantization tables associated with an image sequence. According to the MPEG1 standard two quantization tables constituted by two arrays of 64 bytes are required to decode the video data. The quantization tables used for the coding of a sequence can be either standardized tables established by the MPEG1 standard, or tables proper to the sequence and accompanying the sequence.
All starting codes SC, be they of sequences 2, groups 3, images 4, first sub-images 5, or others, have a similar format FIG. 2 shows the shape of a starting code SC according to the MPEG standards. This code SC generally is a code comprising four bytes. Three first bytes 20, 21 and 22 are used to identify the code as a starting code SC, while a fourth byte 23 enables to identify, notably the nature (sequence, group, image, sub-image, or other) of the code SC. In FIG. 2, the bytes have been represented by their hexadecimal values. Thus, the first three bytes 20, 21 and 22 contain, respectively, the values “00”, “00”, and “01”, while the fourth byte 3 contains a value “XX” identifying, notably, the nature of the code SC.
To enable the adjustment of the video decoder to each sequence 2, group 3, or image 4, it is necessary to recognize the occurrence of a new sequence 2 and analyze its header 6 to extract therefrom the parameters necessary to decode the images that it contains. It is also required to be able to recognize the occurrence of a new group 3, of a new image 4 and of a new sub-image 5 and analyze the parameters contained in the header of a group 3 or an image 4.
The analysis of the parameters and the adjustment of the video decoder must be performed before the corresponding proper video data arrive on the decoder.
Conventionally, the extracting of the decoding parameters from a video data flow 1 is performed by software means from a microprocessor contained within the image restoring device.
Video data flow 1 arrives at the input of a logic circuit for detecting starting codes SC. This circuit is implemented to generate an interrupt directed to the microprocessor, upon each occurrence of a starting code SC, be it of a sequence 2, of a group 3, of an image 4, of a sub-image 5, or other. In other words, the logic circuit generates an interrupt upon each occurrence of a byte series “00”, “00”, “01”.
Data flow 1 is stored in a buffer register (FIFO) as it arrives, to be extracted by the microprocessor. The buffer register is read iteratively by the microprocessor which analyzes, by software means, the fourth byte 23 of the starting code SC, the header 6, 9 or 11, and which configures the video decoder accordingly.
Thus, the extracting of the decoding parameters is performed by the microprocessor which must analyze data flow 1 upon each occurrence of a starting code SC.
A disadvantage of conventional circuits is that they need to use a very fast microprocessor to achieve a real time processing of data flow 1. Another disadvantage, especially present when the restoring device is a microcomputer likely to perform other tasks, is that the analysis of headers 6, 7 or 8 monopolizes the microprocessor. The microcomputer is then no longer available to execute other programs, if it wants to achieve a desired image defiling speed. Indeed, to achieve the desired defiling speed, the interruptions generated by the logic circuit for detecting starting codes should have a relatively high priority. Now, these interrupts are generated for each starting code SC contained in video data flow 1. Further, when a sequence contains its own quantization tables, the microprocessor must organize the storage of these tables so that they are available for the entire image sequence. If the standardized tables conventionally reside within the restoring device, the volume of these tables (two arrays of 64 bytes) results in the monopolizing of the microprocessor, when a sequence contains its own tables, by the processing, byte after byte, of video data flow 1 to organize its storage.